var msgdsq;

function loading_complete_show(tip_text, url) {
	clearTimeout(msgdsq);
	$(".spinner_message").html(tip_text ? tip_text : '请稍等');
	$(".spinner_panel").removeClass("hidden");
	msgdsq = setTimeout(function() {
		setTimeout(function() {
			if(url != '') {
				location.href = url;
			}
		}, 800);
	}, 1000);
}

function loading_tip_show(tip_text) {	
	clearTimeout(msgdsq);
	msgdsq = setTimeout(function() {
		setTimeout(function() {
			$(".spinner_message").html(tip_text ? tip_text : '请稍等');
			$(".spinner_panel").removeClass("hidden");
		}, 800);
	}, 1000);
}

function loading_err_show(tip_text, url) {
	loading_tip_hidden();
	
	setTimeout(function() {
		if(url != '') {
			location.href = url;
		}
	}, 800);
}

function loading_tip_hidden() {
	$(".spinner_panel").addClass("hidden");
} /*缓冲进度条 end*/

//显示加载动画
function show_loading() {
	var str = '<div class="spinner_panel">';
	str += '<span class="spinner_message">请稍候...</span>';
	str += '<div class="spinner">';
	str += '<div class="rect1"></div>';
	str += '<div class="rect2"></div>';
	str += '<div class="rect3"></div>';
	str += '<div class="rect4"></div>';
	str += '<div class="rect5"></div>';
	str += '</div>';
	str += '</div>';
	$('body').append(str);
}